import 'package:flutter_crud_test_amir_rabbani/core/resource/data_state.dart';
import 'package:flutter_crud_test_amir_rabbani/core/resource/use_case.dart';
import 'package:flutter_crud_test_amir_rabbani/data/local/dao/customer_dao.dart';
import 'package:flutter_crud_test_amir_rabbani/data/local/my_database.dart';
import 'package:flutter_crud_test_amir_rabbani/data/repositories/customer_repository.dart';

class ReadByIdCustomerUseCase extends UseCase<DataState<CustomerDaoData>, int> {
  CustomerRepository repository;

  ReadByIdCustomerUseCase(this.repository);

  @override
  Future<DataState<CustomerDaoData>> call(int param) async {
    return await repository.readById(param);
  }
}
